﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.Data;

namespace Utils.DC.Web.UI
{
    public class PageSettings
    {
        public PageSettings()
        {
        }

        public PageSettings(string pageName, string pageTitle, string pageAlias, string metaKeyword, string metaDescription, string controlPath, bool isAdmin)
        {
            this.pageName = pageName;
            this.pageTitle = pageTitle;
            this.pageAlias = pageAlias;
            this.metaKeyword = metaKeyword;
            this.metaDescription = metaDescription;
            this.controlPath = controlPath;
            this.isAdmin = isAdmin;
        }

        public enum PAGE_TYPE { User = (byte)1, Admin = (byte)2};

        public static PageSettings GetDefaultPageSettings(byte type)
        {
            PageSettings page = null;

            if (type == (byte)PAGE_TYPE.User)
            {
                page = new PageSettings("Trang Chủ","Trang Chủ", "trang-chu", "trang-chu", "trang-chu","/Module/Other/trang_chu_function.ascx", false);
            }
            else
            {
                page = new PageSettings("Hệ thống quản trị nội dung","Hệ thống quản trị nội dung", "he-thong-quan-tri-noi-dung", "he-thong-quan-tri-noi-dung", "he-thong-quan-tri-noi-dung","/Admin/Module/he_thong_quan_tri_noi_dung.ascx", true);
            }
            return page;
        }       

        #region Properties
        private int pageID;

        public int PageID
        {
            get { return pageID; }
            set { pageID = value; }
        }
        private String pageName;

        public String PageName
        {
            get { return pageName; }
            set { pageName = value; }
        }
        private String pageAlias;

        public String PageAlias
        {
            get { return pageAlias; }
            set { pageAlias = value; }
        }
        private String pageTitle;

        public String PageTitle
        {
            get { return pageTitle; }
            set { pageTitle = value; }
        }
        private String pageImage;

        public String PageImage
        {
            get { return pageImage; }
            set { pageImage = value; }
        }
        private String pageIcon;

        public String PageIcon
        {
            get { return pageIcon; }
            set { pageIcon = value; }
        }
        private String pageDescription;

        public String PageDescription
        {
            get { return pageDescription; }
            set { pageDescription = value; }
        }
        private String pageContent;

        public String PageContent
        {
            get { return pageContent; }
            set { pageContent = value; }
        }
        private String metaKeyword;

        public String MetaKeyword
        {
            get { return metaKeyword; }
            set { metaKeyword = value; }
        }
        private String metaDescription;

        public String MetaDescription
        {
            get { return metaDescription; }
            set { metaDescription = value; }
        }
        private String lang;

        public String Lang
        {
            get { return lang; }
            set { lang = value; }
        }
        private string functionType;

        public string FunctionType
        {
            get { return functionType; }
            set { functionType = value; }
        }
        private bool isCache;

        public bool IsCache
        {
            get { return isCache; }
            set { isCache = value; }
        }
        private int cacheTime;

        public int CacheTime
        {
            get { return cacheTime; }
            set { cacheTime = value; }
        }
        private String controlPath;

        public String ControlPath
        {
            get { return controlPath; }
            set { controlPath = value; }
        }
        private String urlPath;

        public String UrlPath
        {
            get { return urlPath; }
            set { urlPath = value; }
        }
        private bool isFunctionPage;

        public bool IsFunctionPage
        {
            get { return isFunctionPage; }
            set { isFunctionPage = value; }
        }

        private int? parentID;

        public int? ParentID
        {
            get { return parentID; }
            set { parentID = value; }
        }

        private int functionPageID;

        public int FunctionPageID
        {
            get { return functionPageID; }
            set { functionPageID = value; }
        }

        private bool isAdmin;

        public bool IsAdmin
        {
            get { return isAdmin; }
            set { isAdmin = value; }
        }

        private bool hasEntry;
        public bool HasEntry
        {
            get { return hasEntry; }
            set { hasEntry = value; }
        }
        public ArrayList RoleList;

        private DataTable entry;

        public DataTable Entry
        {
            get
            {
                return entry;
            }
            set
            {
                entry = value;
            }
        }

        private ArrayList partInURL;
        public ArrayList PartInURL
        {
            get { return partInURL; }
            set { partInURL = value; }
        }
        #endregion
    }
}
